
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Role edit</title>
<style type="text/css">

    .Text{
            font-size:small;
            }
    #UserList {
            position:absolute;
            width:800px;
            height:387px;
            z-index:2;
            left: 146px;
            top: 141px;
            font-size: small;
            font-style: normal;
            line-height: normal;
    }
    #Header {
            position:absolute;
            width:99%;
            height:48px;
            z-index:3;
            top: 6px;
            left: 4px;
    }
    #HelloUser {
            position:relative;
            width:130px;
            height:22px;
            z-index:1;
            float: right;
            top: 2px;
    }
    #uslstLabel {
            position:absolute;
            width:430px;
            height:30px;
            z-index:4;
            left: 192px;
            top: 162px;
    }
    #Body {
            position:absolute;
            width:751px;
            height:721px;
            z-index:1;
            left: -7px;
            top: -34px;
    }
    #rightPane {
            position:absolute;
            width:182px;
            height:656px;
            z-index:1;
            left: 570px;
            top: 32px;
    }
    .noneDisplay{
        display: none;
    }
	.red{
		color:#FF0000;
	}
    .font{
        font-size: small;
    }
	.small-font{
		font-size:x-small;
		padding-left:0px;
	}
	.style7 {font-size: 40px}
	.style8 {
		color: #FFFFFF;
		font-weight: bold;
		font-size: 16px;
		font-style: italic;
	}
#errSPU {
	position:absolute;
	width:600px;
	height:31px;
	z-index:5;
	left: 480px;
	top: 340px;
}
#errCT {
	position:absolute;
	width:600px;
	height:28px;
	z-index:6;
	left: 480px;
	top: 370px;
}
#errIT {
	position:absolute;
	width:600px;
	height:24px;
	z-index:7;
	left: 480px;
	top: 400px;
}

#Layer1 {
	position:absolute;
	width:340px;
	height:42px;
	z-index:1;
	left: 225px;
	top: 255px;
}

</style>
<link href="styles.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--

img {
border: none;
}
#tabsG {
      float:left;
      width:100%;
      background:#FFFFF;
      font-size:93%;
      line-height:normal;
      }
    #tabsG ul {
        margin:0;
        padding:10px 10px 0 50px;
        list-style:none;
      }
    #tabsG li {
      display:inline;
      margin:0;
      padding:0;
      }
    #tabsG a {
      float:left;
      background:url("images/tableftG.gif") no-repeat left top;
      margin:0;
      padding:0 0 0 4px;
      text-decoration:none;
      }
    #tabsG a span {
      float:left;
      display:block;
      background:url("images/tabrightG.gif") no-repeat right top;
      padding:5px 15px 4px 6px;
      color:#FFF;
      }
    /* Commented Backslash Hack hides rule from IE5-Mac \*/
    #tabsG a span {float:none;}
    /* End IE5-Mac hack */
    #tabsG a:hover span {
      color:#FFF;
      }
    #tabsG a:hover {
      background-position:0% -42px;
      }
    #tabsG a:hover span {
      background-position:100% -42px;
      }

	#tabsG #current a {
			background-position:0% -42px;
	}
	#tabsG #current a span {
			background-position:100% -42px;
	}
.style18 {font-size: 16}
#Layer2 {
	position:absolute;
	width:373px;
	height:115px;
	z-index:4;
	left: 236px;
	top: 305px;
}
.style19 {font-size: 18px; font-weight: bold; }
</style>
</head>
<body>
<script src="javascript/jquery.min.js">
$(document).ready(function(){
	$('a').click(function(event){
		event.preventDefault;
	});
});
</script>
<script type="text/javascript">
	
	function getCheckedValue(radioObj) {
		if(!radioObj)
			return "";
		var radioLength = radioObj.length;
		if(radioLength == undefined)
			if(radioObj.checked)
				return radioObj.value;
			else
				return "";
		var count = 0;
		for(var i = 0; i < radioLength; i++) {
			if(radioObj[i].checked) {
				return radioObj[i].value;
			}
		}
		return "";
	}
	function popup(url) 
	{
	 var width  = 500;
	 var height = 400;
	 var left   = (screen.width  - width)/2;
	 var top    = (screen.height - height)/2;
	 var params = 'width='+width+', height='+height;
	 params += ', top='+top+', left='+left;
	 params += ', directories=no';
	 params += ', location=no';
	 params += ', menubar=no';
	 params += ', resizable=no';
	 params += ', scrollbars=no';
	 params += ', status=no';
	 params += ', toolbar=no';
	 newwin=window.open(url,'windowname5', params);
	 if (window.focus) {newwin.focus();}
	 return false;
	}
	function select_item(i)
	{
		var anchor = document.getElementsByName("profname");
		var text = anchor[i].text;
		//anchor[i].href += "?text=" + text;
		popup("updateProfile.jsp"+"?text="+text);
	}
	
	function delete_item(){
		var item = getCheckedValue(document.forms[0].elements['profile']);
		$.post("profile_Drop", {hehe:item}, function(data){
            if(data.indexOf("<HTML>") == -1){
            	alert(data);
			}
            window.location.href = "profileList.jsp";
        });
        
		
	}
</script>
<jsp:useBean id="user" class="data.UserInfo" scope="session"/>
<div id="header">
    	<div class="mainLogo">
            <div class="logo style7">Information System Security </div>
            <div class="author">
              <p class="style8">&nbsp;</p>
              <p class="style8">AUTHOR : GROUP 1</p>
            </div>
        </div>
        <div class="icons">
        	<a href=""></a>&nbsp;<a href=""></a>        </div>
        <div id="navcontainer">
            <ul id="navlist">
                <li><a href="UserInfo.jsp">HOME</a></li>
                <li class="menuSeparator"><img src="images/menuSeparator.png" alt="" /></li>
                <li ><a href="profileList.jsp">PROFILE </a></li>
                <li class="menuSeparator"><img src="images/menuSeparator.png" alt="" /></li>
                <li id="active"><a href="Role.html">ROLE</a></li>
                <li class="menuSeparator"><img src="images/menuSeparator.png" alt="" /></li>
                <li><a href="#">TABLE</a></li>
                <li class="menuSeparator"><img src="images/menuSeparator.png" alt="" /></li>
                <li><a href="#">CONTACT</a></li>
            </ul>
        </div>
    
<div id="Header">
  <div id="HelloUser">
      <div align="right">
          Hello <jsp:getProperty name="user" property="username"/>!
          <br>
          <a href="index.jsp">Sign out</a>      </div>
  </div>
</div>
</div>

<br/><br/>
<br />
<br />
                <form name="editRole" action="editRole" method="get">
<p class="style19">Select role:</p>
<span class="style18">
<input type="text" name="RoleName" value="*">
<input type="button" onclick='dataitem = window.open("searchRole.html?s=" + encodeURI(document.forms[0].RoleName.value), "dataitem", "toolbar=no,menubar=no,scrollbars=yes");
		targetitem = document.forms[0].RoleName;
		dataitem.targetitem = targetitem;' value="Search Role">
<br />
<input type="submit" value="Edit role">
</span>
</form>
<form name="createRole" action="createRole" method="post">
<p class="style19">Create new role</p>
<p class="style18">New role name: <input type="text" name="rolename" value=""></p>
<p><span class="style18">Role password:</span> 
  <input type="text" name="pwd" value=""></p>
<input type="submit" value="Create">
</form>
</body>
</html>